import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import common from './common/common'
import { constants } from './common/constants'
import { urls } from '@/api/urls'

import uView from '@/uni_modules/uview-ui'
Vue.use(uView).use(common)

Vue.prototype.isLoginFn = common.isLogin
Vue.prototype.constants = constants
Vue.prototype.allUrls = urls
Vue.prototype.defaultColor = '#06C638'
Vue.prototype.timestamp = new Date().getTime()

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})

require('./api/http.js')(app)

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif